<div class="content scrollBox">
    <div class="title">
        <h3>Line</h3>
    </div>
    <form id="parameterForm" role="form" action="${base}/svg/operate/parameter/save/" method="post">
        <input type="hidden" name="id" value="${(parameter.id)!}">
        <input type="hidden" name="templateId" value="${(parameter.templateId)!}">

        <div class="size item">
            <div class="tit">
                Length
            </div>
            <div class="area">
                <div class="height">
                    <span>H</span>
                    <input type="text" value="${(parameter.height)!}" class="form-control" name="height" id="height">
                </div>
            </div>
        </div>


        <div class="Notes item">
            <div class="tit">
                Notes (Optional)
            </div>
            <div class="area">
                <div class="input-textarea">
                    <textarea placeholder="Enter notes" name="memo" id="memo">${(parameter.memo)!}</textarea>
                </div>
            </div>
        </div>
        <div class="item btns g-button-wrap">
            <button class="save-button border "  onclick="$('#parameterForm').submit();" name="save_button" id="save_button" type="button">Save</button>
        </div>
    </form>
</div>
<script type="text/javascript">
    $(function () {
        $("#parameterForm").validate({
            submitHandler: function (form) {
                submitIcon();
            }
        });
    });

    function submitIcon() {
        utils.HF.ajaxFormSubmit('parameterForm', function (result) {
            utils.HF.Alert("Save Success");
            svgCanvas.list[svgCanvas.selectedObjectID].parameterId = result;
            svgCanvas.list[svgCanvas.selectedObjectID].memo = $("#height").val();
            $("#" + svgCanvas.selectedObjectID + " textPath").html($("#height").val())
        }, function (e) {
            utils.HF.Alert("Save Failure");
        });
    }
</script>
